package com.universest.swordholder.aitool

import com.alibaba.fastjson.annotation.JSONField

data class Message(
    @JSONField(name = "role") val role: String,
    @JSONField(name = "content")val content: String,
    @JSONField(name = "deepThought") val deepThought: String = ""
)

fun Collection<Message>.getContextLength(): Int {
    return this.sumOf { it.content.length }
}